﻿Public Class CustomersUsingObjectsForm

    Private Sub Form1_Load(ByVal sender As System.Object, _
                       ByVal e As System.EventArgs) Handles MyBase.Load
        Me.CustomerBindingSource.DataSource = GetCustomers()
    End Sub

    Public Function GetCustomers() As Customer()
        'Populate customers list..... eg from webservice
        Dim cust As Customer() = New Customer() {New Customer With {.Name = "Joe Blogs"}, _
                                                 New Customer With {.Name = "Sarah Burner"}, _
                                                 New Customer With {.Name = "Matt Swift"}, _
                                                 New Customer With {.Name = "Barney Jones"}}
        Return cust
    End Function


End Class
